home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_12_02
/
smith
/
conv2_13.c
< prev
next >
Wrap
Text File
|
1993-12-14
|
307b
|
9 lines
#define BASE 91 /* # possible output chars */
#define FIRST_CODE '!' /* lowest output character */
#define BASEVAL(c) ((c)-FIRST_CODE)
...
int t = getcode(); /* get next valid char */
int u = getcode(); /* get next valid char */
return BASEVAL(t) * BASE + BASEVAL(u);